package com.dennytech.tac.ui.activity;

import android.content.pm.PackageInfo;
import android.os.Bundle;
import android.widget.TextView;

import com.dennytech.tac.base.CFActivity;
import com.dennytech.tac.R;

public class AboutActivity extends CFActivity {

	@Override
	protected void initView() {
		setContentView(R.layout.about);
		updateVersionText((TextView) findViewById(R.id.version));
	}

	@Override
	protected void onCreate(Bundle b) {
		super.onCreate(b);
	}

	public void updateVersionText(TextView versionText) {
		try {
			PackageInfo pi = getPackageManager().getPackageInfo(
					getPackageName(), 0);
			StringBuilder s = new StringBuilder();
			s.append(getResources().getString(R.string.label_version)).append(
					pi.versionName);
			versionText.setText(s.toString());
		} catch (Exception e) {
		}
	}

}
